// DO NOT CHANGE THE SETUP OF THIS CLASS!

public class QuadraticEquation {
	private double a, b, c;

	// Default Constructor. Initialize a, b, and c to 0.0
	public QuadraticEquation() {
		this(0d, 0d, 0d);
	}

	public QuadraticEquation(double a, double b, double c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	public boolean hasSolutions() {
		return (b*b-4*a*c)>=0;
	}

	// If a solution exists, return the smaller solution
	// Hint: You may need to check which solution is smaller!
	public double getSolution1() {
		return Math.min((0-b+Math.sqrt(b*b-4*a*c))/(2*a), (0-b-Math.sqrt(b*b-4*a*c))/(2*a));
	}

	// If a solution exists, return the larger solution.
	public double getSolution2() {
		return Math.max((0-b+Math.sqrt(b*b-4*a*c))/(2*a), (0-b-Math.sqrt(b*b-4*a*c))/(2*a));
	}
}